<template>
	<view>
		<u-popup :show="show" @close="close" closeable round='10'>

			<view style="padding:20rpx;width: 750rpx;display: flex;flex-direction: column;align-items: center;">
				<text class="title">发布&开播</text>
				<view class="liveOrvoide">
					<view class="live" @click="goLive(1)">
						<image src="@/static/live.png" style="width: 100rpx;height: 100rpx;border-radius: 20rpx;">
						</image>
						<text style="font-size: 32rpx;color: #2133FF;margin-top: 10rpx;">发布动态</text>
					</view>
					<view class="live" style="" @click="goLive(2)">
						<image src="@/static/live.png" style="width: 100rpx;height: 100rpx;border-radius: 20rpx;">
						</image>
						<text style="font-size: 32rpx;color: #2133FF;margin-top: 10rpx;">开启直播</text>
						<text style="font-size: 24rpx;color: #BEC7D1;">未认证</text>
					</view>
				</view>
			</view>
		</u-popup>
		<u-tabbar :value="index" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" activeColor='#2133FF'>
			<u-tabbar-item text="首页" @click="click1">
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="active-icon"
					src="@/static/home1.png"></image>
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="inactive-icon"
					src="@/static/home.png"></image>
			</u-tabbar-item>
			<u-tabbar-item text="联盟" @click="click1">
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="active-icon"
					src="@/static/home1.png"></image>
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="inactive-icon"
					src="@/static/lm.png"></image>
			</u-tabbar-item>
			<u-tabbar-item @click="click1">
				<image class="u-page__item__slot-icon" style="width: 150rpx;;height:62rpx;" slot="active-icon"
					src="@/static/kb.png"></image>
				<image class="u-page__item__slot-icon" style="width: 150rpx;;height:62rpx;" slot="inactive-icon"
					src="@/static/kb.png"></image>
			</u-tabbar-item>
			<u-tabbar-item text="消息" @click="click1">
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="active-icon"
					src="@/static/xx1.png"></image>
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="inactive-icon"
					src="@/static/xx.png"></image>
			</u-tabbar-item>
			<u-tabbar-item text="我的" @click="click1">
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="active-icon"
					src="@/static/my1.png"></image>
				<image class="u-page__item__slot-icon" style="width: 40rpx;height: 40rpx;" slot="inactive-icon"
					src="@/static/my.png"></image>
			</u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		props: ['index'],
		data() {
			return {
				path: ['/pages/home/home/home', '/pages/home/lm', '', '', '/pages/home/my'],
				show: false,

			}
		},
		methods: {
			goLive(index) {
				// console.log(index)
				if (index == 1) {
					uni.navigateTo({
						url: '/pages/home/uploadVideo'
					})
				} else {
					uni.navigateTo({
						url: '/pages/home/uploadVideo'
					})
				}
			},
			close() {
				this.show = false
			},
			click1(e) {
				if (e == 2) {
					this.show = true
				} else {
					let that = this
					if (e != that.index) {
						uni.reLaunch({
							url: that.path[e]
						})
					}

				}
				console.log(e)
			},
		}
	}
</script>

<style>
	.title {
		font-size: 32rpx;
		font-weight: 700;
	}
</style>
<style lang="less">
	.liveOrvoide {
		width: 550rpx;
		height: 200px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;

		.live {
			width: 100px;
			height: 200rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: flex-start;
		}
	}
</style>
